/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2025-03-15
 * Time: 14:05
 */
public class Date {
    public int year;
    public int month;
    public int day;
    public Date(int year, int month, int day){
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("Date构造方法被调用了， 实例化对象会跳到构造方法");
    }
    public void printDate(Date this){
        System.out.println(this.year + "/" + this.month + "/" + this.day);
    }
    public static void main(String[] args) {
        Date d1 = new Date(2024,9,15);
        d1.printDate();
        Date d2 = new Date(2025,8,1);
        d2.printDate();
    }
}
/*

运行
        Date构造方法被调用了， 实例化对象会跳到构造方法
        2024/9/15
        Date构造方法被调用了， 实例化对象会跳到构造方法
        2025/8/1
*/
